<style>
    .form-group .required:before{
        content:'* ';
        color:red;
    }
</style>
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">




    <div class="form-group">
        <label for="c-name2" class="control-label col-xs-12 col-sm-2 required">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name2" data-rule="required" class="form-control" name="row[cate_name]" type="text" value="{$data.cate_name ?? ''}" placeholder="">

        </div>
    </div>





    <div class="form-group">
        <label for="c-name3" class="control-label col-xs-12 col-sm-2 required">{:__('Code')}:</label>
        <div class="col-xs-12 col-sm-8">
            {if $id eq 0}
            <input id="c-name3" data-rule="required" class="form-control" name="row[bianhao]" type="text" value="{$data.bianhao ?? ''}" placeholder="">
            {else/}
            <input id="c-name3" data-rule="required" class="form-control" disabled type="text" value="{$data.bianhao ?? ''}" placeholder="">

            {/if}
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2 required">{:__('Type')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[type]', ['1'=>__('Income type'), '2'=>__('Expenditure type')], $type)}
        </div>
    </div>







    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <input type="hidden" name="row[id]" value="{$id}">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
